<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>项目管理CRM | Log in</title>
    <!-- Tell the browser to be responsive to screen width -->
    <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
    <!-- jQuery 2.2.3 -->
    <script src="/static/AdminLTE-2.3.11/plugins/jQuery/jquery-2.2.3.min.js"></script>
    <!-- Bootstrap 3.3.6 -->
    <link rel="stylesheet" href="/static/AdminLTE-2.3.11/bootstrap/css/bootstrap.min.css">
    <!-- Font Awesome -->
    <!--link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.5.0/css/font-awesome.min.css"-->
    <!-- Ionicons -->
    <!--link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/ionicons/2.0.1/css/ionicons.min.css"-->
    <!-- Theme style -->
    <!--link rel="stylesheet" href="/static/AdminLTE-2.3.11/dist/css/AdminLTE.min.css"-->
    <!-- iCheck -->
    <link rel="stylesheet" href="/static/AdminLTE-2.3.11/plugins/iCheck/square/blue.css">
    <script src="/static/AdminLTE-2.3.11/plugins/iCheck/icheck.min.js"></script>
    <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
  <script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
  <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
  <![endif]-->
    <style>
        .body-color {
            background-color: darkolivegreen;
        }
        
        .col-center-block {
            float: none;
            display: block;
            margin-left: auto;
            margin-right: auto;
        }
        
        .container {
            display: table;
            height: 100%;
        }
        
        .row {
            display: table-cell;
            vertical-align: middle;
        }
    </style>
</head>

<!-- 
    {{range .DCLBS}} {{.Id}},{{.LbMc}} {{end}} 
    用于切片的输出
    -->

<body class="body-color">
    <div style="height:20px;"></div>

    <div class="container col-center-block well well-lg">
        <div class="row clearfix">
            <div class="col-md-12 column">
                <div class="panel panel-default panel-success">
                    <div class="panel-heading">
                        <span class="text-center"><h3>华中师范大学信息办多媒体教室满意度调查</h3></span>
                    </div>
                    <div class="panel-body panel-info">
                        <form class="form-horizontal" role="form" action="/wwfw/myddc" method="post">
                            {{range .DCLBS}} {{if eq 21 .Id}}
                            <div class="form-group">
                                <label for="{{.Id}}" class="col-sm-4 control-label">{{.LbMc}}</label>
                                <div class="col-sm-8">
                                    <textarea name="{{.Id}}" id="text-{{.Id}}" class="form-control" rows="3"></textarea>
                                </div>
                            </div>
                            {{else}} {{if eq 1 .Hide}}
                            <!--如果是隐藏字段-->
                            <input type="input" name="{{.Id}}" id="radio-{{.Id}}-1" value="" hidden> {{else}}
                            <!--不是隐藏字段-->
                            <div class="form-group">
                                <label class="col-sm-4 control-label" id="{{.Id}}">{{.LbMc}}</label>
                                <div class="col-sm-8 ">
                                    <label class="radio-inline">
                                            <input type="radio" name="{{.Id}}" id="radio-{{.Id}}-1" value="满意" checked> 满意
                                        </label>
                                    <label class="radio-inline">
                                            <input type="radio" name="{{.Id}}" id="radio-{{.Id}}-2" value="不满意"> 不满意
                                        </label>
                                </div>
                            </div>
                            {{end}} {{end}} {{end}}
                            <div class="form-group">
                                <div class="col-sm-offset-4 col-sm-6">
                                    <button type="submit" class="btn btn-default btn-lg">
                                        <span class="glyphicon glyphicon-send" aria-hidden="true"></span> 提交调查表
                                    </button>
                                </div>
                            </div>
                        </form>
                    </div>
                </div>



            </div>
        </div>
    </div>
    <script>
        $("#submit111111").on('click', function(e) {
            $(this).text("正在提交中...");
            //alert("hehe");
            $.ajax({
                type: "POST",
                dataType: "json",
                url: '/myddc',
                data: {
                    id: "110",
                    data: "ee"
                },
                success: function(res) {
                        console.log("返回数据：")
                        console.log(res)
                        if (res.RetString == 'ok') {
                            //提交成功
                            //alert(res . msg);
                            //成功后跳转路由设置
                            window.location.href = res.GoUrl;
                        } else {
                            //提交不成功
                        }
                    } //success
            }); //$.ajax
        }); //$("#submit").on(

        $(function() {
            $('input').iCheck({
                checkboxClass: 'icheckbox_square-blue',
                radioClass: 'iradio_square-blue',
                increaseArea: '20%' // optional
            });
        });
    </script>
</body>

</html>